package com.example.ben.alltest;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;


public class LoginAction extends AppCompatActivity implements LoginInterface {
    private EditText UserName;
    private EditText Password;
    private Button Login;
    private TextView Register;
    private TextView ForgetPwd;


    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.loginpage);
        //初始化组件
        InitView();
        Register.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent();
                intent.setClass(LoginAction.this, RegisterActivity.class);
                startActivity(intent);
            }
        });

        ForgetPwd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent();
                intent.setClass(LoginAction.this, ForgetPassword.class);
                startActivity(intent);
            }
        });
        Login.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent();
                intent.setClass(LoginAction.this, com.example.ben.alltest.Login.class);
                startActivity(intent);
            }
        });
    }

    @Override
    public void ShowingInfo() {

    }

    @Override
    public void Loging() {

    }

    @Override
    public void InitView() {
        UserName = (EditText) findViewById(R.id.UserName);
        Password = (EditText) findViewById(R.id.Passwoord);
        Login = (Button) findViewById(R.id.Login);
        Register = (TextView) findViewById(R.id.Register);
        ForgetPwd = (TextView) findViewById(R.id.ForgetPwd);
    }

}

